/*******************************************************************************
 * Copyright (C), 2014, BeeIoT Tech. Co., Ltd. 
 * FileName:      object.h
 * Author:        lvxin 
 * Version :      1.0
 * Date:          2014-09-13 09:40:40
 * Description:
 * Function List: // 主要函数及其功能
 * 1. ------- 
 * History:
 * <author>   <time>                <version >  <desc> 
 * lvxin      2014-09-13 09:40:40   1.0         build this moudle 
 ******************************************************************************/

#ifndef  CMDFIFO_H
#define  CMDFIFO_H

/*******************************************************************************
 *  *INCLUDES
 *  */
#include <stdint.h>

/*******************************************************************************
 *  *TYPEDEFS
 *  */

//内部命令执行句柄
typedef struct sm_inner_cmd_handle
{
    char cmd;
    int (*proc)(char cmd, char* param);
}cmd_fifo_cmd_handle_t;

/*******************************************************************************
 *  *PUBLIC FUNCTIONS
 *  */
//处理执行命令
int cmd_fifo_main_loop();
//命令推入fifo
int cmd_fifo_add (char cmd, char *param);
//初始化命令句柄
int cmd_fifo_init(cmd_fifo_cmd_handle_t *handle_list, int number);

#endif  /*CMDFIFO_H*/
